import APIClient from "../../network/index";

const homeStore = {
    state: {
      subjextItems:[]//主观项目
    },
    mutations: {//方法
      init_subject_data(state,items){
        state.subjextItems  = [...items];
      }
    },
    actions: {//请求数据
      init_subject_data(context){
        APIClient.getSubjectList().then((res)=>{//请求商品列表
        //   console.log(res)
          context.commit("init_subject_data",res.data.data)
        }).catch((error)=>{
        //   console.log(error)
        })
      }
    },
    modules: {
      
    }
  }
  
  export default  homeStore;